package com.zg.scf.enm;

/**
 * 用户类型
 */
public enum UserTypeEnum {

    SYSTEM("0","平台"),
    ENTERPRISES("1","融资企业"),
    INSTITUTION("2","金融机构"),

    ;
    private String code;
    private String name;

    UserTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static UserTypeEnum getByCode(String code) {
        for (UserTypeEnum value : UserTypeEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
